NumberSerialItem

Creates a number serial item that will be used to represent an incremental number.

NumberSerialItem() Creates the Number serial item

Properties

CurrentNumber Gets or sets the current number which will be used to resume a serial number sequence again.
EndNumber Gets or Sets the End number of a serial number sequence.
FixedLength Gets or Sets the fixed length of a serial number.
Increment Gets or Sets the increment value of the serial number.
IsCurrentNumberEnabled Gets or Sets whether the marking process should use the CurrentNumber
IsEndNumberEnabled Gets or Sets the whether the serial number sequence should be end with a defined value.
NumarelRepresentation Gets or Sets the number system style used for the serial number.
RepeatCount Gets or Sets the number of times a serial number should be repeated before incrementing to the next.
ResetTime1 Gets or sets the time at which the serial number should get reset.
ResetTime2 Gets or sets the time at which the serial number should get reset.
ResetTime3 Gets or sets the time at which the serial number should get reset.
StartNumber Gets or Sets the start number of a serial number sequence.

 

Example

Copy
 VectorImage vectorImage = scanDocument.CreateVectorImage("image1", DistanceUnit.Millimeters);

 vectorImage.SetJumpSpeed(2000);
 vectorImage.SetMarkSpeed(1000);
 vectorImage.SetMarkDelay(200);
 vectorImage.SetJumpDelay(150);

 //Create serial number
 SerialNumber serialVar1 = new SerialNumber("serialVar");

 //Add serialNumber to scandocument
 scanDocument.AddSerialNumberVariable(serialVar1);

 // Text Serial Item 
 TextSerialItem fixedText = new TextSerialItem();
 fixedText.Text = "Serial No: MGT";
 serialVar1.SerialItemList.Add(fixedText);

 // Number Serial Item
 NumberSerialItem numberSerialItem = new NumberSerialItem();
 numberSerialItem.IsCurrentNumberEnabled = true;
 numberSerialItem.IsRemoveLeadingZero = false;
 numberSerialItem.StartNumber = 1f;
 numberSerialItem.CurrentNumber = 100f; // Starting from 100
 numberSerialItem.EndNumber = 10000f;
 numberSerialItem.Increment = 1f;
 numberSerialItem.FixedLength = 6;
 numberSerialItem.RepeatCount = 1;
 numberSerialItem.NumarelRepresentation = NumberSystemStyle.Decimal;
 serialVar1.SerialItemList.Add(numberSerialItem);


 //Save serialization instance data to SMC
 scanDocument.IsSaveAndUseSerailizationState = false;

 //Time to expire the serialization instance data
 scanDocument.SerailizationStateSaveDataExpirationTime = 1;

 //Dynamic Text 
 DynamicTextShape dynamicText = new DynamicTextShape();
 dynamicText.Height = 5;
 dynamicText.Location = new Point3D(0, 0, 0);
 dynamicText.VariableName = "dynText1";
 dynamicText.Text = " ";
 dynamicText.EvaluateVariableTags = true;
 dynamicText.FontName = "Arial";
 dynamicText.CharacterGap = 0;
 dynamicText.ScaleX = 1;
 dynamicText.ScaleY = 1;
 dynamicText.Angle = 0;

 // Embed Font  
 Collection<UnicodeRange> unicodeRanges = new Collection<UnicodeRange>();
 UnicodeRange unicodeRange = new UnicodeRange();
 unicodeRange.StartingCharacter = Convert.ToChar(0x00);
 unicodeRange.EndingCharacter = Convert.ToChar(0xff);    // Characters from 0 to 255 or basically extended ASCII range is embedded
 unicodeRanges.Add(unicodeRange);
 scanDocument.EmbedFont("Arial", FontStyle.Regular, unicodeRanges);

 vectorImage.AddDynamicText(dynamicText, new SerialNumberEx(serialVar1));

 scanDocument.Scripts.Add(new ScanningScriptChunk("defaultScript", "ScanAll()"));